package jdbc;

import java.util.LinkedList;
import java.util.ListIterator;

class Employee {
	String name;

	Employee(String name) {
		this.name = name;
	}

	public void display() {
		System.out.println(name);
	}

}

public class Generics {
	public static void main(String[] args) {
		LinkedList<Employee> ll = new LinkedList<Employee>();
		ll.add(new Employee("Raj"));
		ll.add(new Employee("Naveen"));
		ll.add(new Employee("Sapna"));
		ListIterator<Employee> i = ll.listIterator();
		while (i.hasNext()) {
			Employee ee = i.next();
			ee.display();
		}
	}
}
